Optimal. Leaf size=17 \[ -\frac {\cot (x) \log (\cos (x))}{\sqrt {a \cot ^2(x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3739, 3556}
\begin {gather*} -\frac {\cot (x) \log (\cos (x))}{\sqrt {a \cot ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3739
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {a \cot ^2(x)}} \, dx &=\frac {\cot (x) \int \tan (x) \, dx}{\sqrt {a \cot ^2(x)}}\\ &=-\frac {\cot (x) \log (\cos (x))}{\sqrt {a \cot ^2(x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 17, normalized size = 1.00 \begin {gather*} -\frac {\cot (x) \log (\cos (x))}{\sqrt {a \cot ^2(x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 26, normalized size = 1.53
method | result | size |
derivativedivides | \(\frac {\cot \left (x \right ) \left (\ln \left (\cot ^{2}\left (x \right )+1\right )-2 \ln \left (\cot \left (x \right )\right )\right )}{2 \sqrt {a \left (\cot ^{2}\left (x \right )\right )}}\) | \(26\) |
default | \(\frac {\cot \left (x \right ) \left (\ln \left (\cot ^{2}\left (x \right )+1\right )-2 \ln \left (\cot \left (x \right )\right )\right )}{2 \sqrt {a \left (\cot ^{2}\left (x \right )\right )}}\) | \(26\) |
risch | \(-\frac {\left ({\mathrm e}^{2 i x}+1\right ) x}{\sqrt {-\frac {a \left ({\mathrm e}^{2 i x}+1\right )^{2}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}-\frac {i \left ({\mathrm e}^{2 i x}+1\right ) \ln \left ({\mathrm e}^{2 i x}+1\right )}{\sqrt {-\frac {a \left ({\mathrm e}^{2 i x}+1\right )^{2}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}-1\right )}\) | \(94\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 12, normalized size = 0.71 \begin {gather*} \frac {\log \left (\tan \left (x\right )^{2} + 1\right )}{2 \, \sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 45 vs.
\(2 (15) = 30\).
time = 2.69, size = 45, normalized size = 2.65 \begin {gather*} -\frac {\sqrt {-\frac {a \cos \left (2 \, x\right ) + a}{\cos \left (2 \, x\right ) - 1}} \log \left (\frac {1}{2} \, \cos \left (2 \, x\right ) + \frac {1}{2}\right ) \sin \left (2 \, x\right )}{2 \, {\left (a \cos \left (2 \, x\right ) + a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {a \cot ^{2}{\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 19, normalized size = 1.12 \begin {gather*} -\frac {\log \left ({\left | \cos \left (x\right ) \right |}\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (x\right )\right ) \mathrm {sgn}\left (\sin \left (x\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.29, size = 25, normalized size = 1.47 \begin {gather*} -\frac {\mathrm {atan}\left (\frac {\sqrt {-a}\,\mathrm {cot}\left (x\right )}{\sqrt {a}\,\sqrt {{\mathrm {cot}\left (x\right )}^2}}\right )}{\sqrt {-a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________